Emulator streaming#3211
Open
LoneAngelFayt wants to merge 68 commits into
Open
Conversation
Contributor
Author
|
I've finished setting up the integration for dolphin as well, I'm going to split it out into a different PR for each integration There is thankfully minimal changes but I turn some hardcoding into variables Once you get done looking through this I'll adapt the others and put them in as I have them completed |
…e support" This reverts commit ef4f6d6.
Merged feat/pcsx2-streaming-v2 onto current upstream/master. Conflict resolutions: kept both upstream's new GAMELIST_MEDIA config fields and streaming config fields; kept both sync and streaming router imports in main.py; merged env.template dev section with BROKER_SECRET addition.
9c8da66 to
6a0e5ff
Compare
Contributor
Author
|
@gantoine I changed my mind, and just added all the emulators I've gotten working along with their respective changes. I recruited Claude to help make my PR description a little better as well. Should outline everything I've touched and how it all works. |
Dolphin (and other multi-platform emulators) serve ngc and wii from the same container. Using req.platform as the _sessions key let both slugs claim the same container concurrently. Add _container_key() which returns broker_host (or host) as a stable container identity, and rekey all _sessions reads/writes accordingly.
…test, fix log format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds a streaming framework to RomM that lets you launch games from the RomM UI into a native emulator running in a separate container. The stream comes back in the browser, with save state controls, volume, and session management built into the player.
The emulator runs in a linuxserver Docker container with a Selkies WebRTC stream. An HTTP broker sidecar inside that container handles game launches, archive extraction, and I/O. RomM talks to the broker through a new
/api/streamingbackend endpoint and embeds the stream in a player view.Four emulators are covered here. More (PS3/rpcs3 and others) will follow in separate PRs once this lands.
Supported emulators
ps2ngc,wii,wiiuxboxswitchArchitecture
Configuration (
config.yml)Each emulator is its own container entry. Multiple platforms can share a container (e.g.
ngc/wii/wiiuall pointing at the same Dolphin instance) or use separate ones.hostis the URL the browser loads the stream from;broker_hostis the server-side URL RomM uses to send commands.Set a
BROKER_SECRETenv var on both the RomM container and the emulator container to authenticate broker API calls.Changes
Backend
backend/endpoints/streaming.py— new router: session management, broker proxy, config endpointbackend/config/config_manager.py—STREAMING_ENABLED+STREAMING_CONTAINERSconfig fieldsbackend/main.py— registers streaming routerFrontend
frontend/src/stores/streaming.ts— Pinia store: config, session lifecycle, per-platform capabilitiesfrontend/src/views/Player/Stream/Player.vue— streaming player view: Selkies iframe, loading overlay with extraction progress bar, save state controls, volume/mutefrontend/src/components/common/Game/PlayBtn.vue— "Play on [label]" button appears when a streaming container is configured for the platformfrontend/src/layouts/Main.vue— stream player route wired into navfrontend/src/plugins/router.ts—/play/:platform/:romIdrouteConfig
examples/config.example.yml— streaming config example with commentsenv.template—BROKER_SECRETvariableBroker containers
Each emulator has a companion Docker mod repo with the broker sidecar:
Each repo includes a
docker-compose.ymlshowing the full setup.UX flow
/statusAI Disclosure
Claude assisted in generating code and documentation.